<?php
include('database.php');

$token = addslashes(@$_GET['token']);
$report = getReport(1);
$response = array(
    'result' => true,
    'data' => array(
        'report' => $report,
    )
);
echo json_encode($response);
exit;
        
function getReport($userGroup)
{
    $data = array(
        'day' => 4,
        'week' => 10,
        'month' => 20,
        'chart' => array(
            array('date' => '2015-03-09', 'value' => 2),
            array('date' => '2015-03-10', 'value' => 5),
            array('date' => '2015-03-11', 'value' => 6),
            array('date' => '2015-03-12', 'value' => 7),
            array('date' => '2015-03-13', 'value' => 1),
            array('date' => '2015-03-14', 'value' => 4),
            array('date' => '2015-03-15', 'value' => 8),
        )
    );
  
    return $data;
}